package com.sinven.serviceImpl;

import com.sinven.dao.ChannelDao;
import com.sinven.entity.Channel;
import com.sinven.service.ChannelService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Service("ChannelService")
@Transactional
public class ChannelServiceImpl implements ChannelService {

    @Autowired
    @Qualifier(value = "ChannelDao")
    private ChannelDao channelDao;

    @Override
    public List<Channel> listChannel() {
        String hql="from Channel";
        return channelDao.listChannel(hql);
    }
}
